package org.hook.showcase.pattern.proxy.virtual.impl;

import java.net.URL;

import org.hook.showcase.pattern.proxy.virtual.Icon;

public class ImageProxy implements Icon {
	private ImageIcon imageIcon;
	private URL imageUrl;
	private Thread retrievalThread;
	private boolean retrieving;

	public ImageProxy(URL url) {
		this.imageUrl = url;
	}

	@Override
	public int getIconWidth() {
		if (imageIcon != null)
			return imageIcon.getIconWidth();
		return 800;
	}

	@Override
	public int getIconHeight() {
		if (imageIcon != null)
			return imageIcon.getIconHeight();
		return 600;
	}

	@Override
	public void paintIcon() {

	}
}
